package com.css.apps.base.ip.action;

import com.css.apps.base.ip.model.SIp;
import com.css.apps.base.ip.service.IpService;
import com.css.core.model.IServiceResult;
import com.css.util.Ajax;
import com.css.webbase.webwork.action.AdminAction;
import com.opensymphony.xwork.ModelDriven;

@SuppressWarnings("serial")
public class UpdIp extends AdminAction implements ModelDriven {

	private SIp sip = null;

	public UpdIp() {
		this.sip = new SIp();
	}

	@Override
	protected String adminGo() {
		IServiceResult<?> res = IpService.updIp(sip);
		result = Ajax.JSONResult(res.getResultCode(), res.getResultDesc());
		return res.toActionResult();
	}

	public SIp getSip() {
		return sip;
	}

	public void setSip(SIp sip) {
		this.sip = sip;
	}

	@Override
	public Object getModel() {
		return sip;
	}
}
